#include <iostream>

using std::cout;
using std::endl;

//1 + 2 +3 + ... + 10

int sum()
{
    return 0;
}

/* int sum(int x) */
/* { */
/*     return x; */
/* } */

template<typename T, typename ...Args>
int sum(T x, Args ...args)
{
    return x + sum(args...);
}

int main(int argc, char *argv[])
{
    cout << "sum(1...10) = " 
         << sum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) << endl;
    return 0;
}

